import request from '@/utils/request.js'
const PATH = '/admin/sights'

// 获取景点列表
export const getSightsList = ({ page, pageSize, name }) => {
  return request.get(PATH + '/pageQuery', {
    params: {
      page,
      pageSize,
      name
    }
  })
}

// 新增景点
export const addSights = (data) => request.post(PATH + '/add', data)

// 修改景点状态
export const updateStatus = ({ id, status }) =>
  request.put(PATH + `/update/${id}/${status}`)

// 删除景点
export const deleteByIds = (ids) =>
  request.delete(PATH + '/batchDelete', {
    params: {
      ids: ids.join(',')
    }
  })

// 修改景点信息
export const updateSights = (data) => request.put(PATH + '/update', data)
